function checkboxOnclick(checkbox) {
    if (checkbox.checked == true) {
        document.getElementById("customerPhone").value = "";
        $("#customerPhone").attr("disabled",false);
    } else {
        document.getElementById("customerPhone").value = "${customerInfo.customerPhone}";
        $("#customerPhone").attr("disabled",true);
    }
}
$(".template_content").on('click','li',function () {
    $(this).find('.ulShow').toggle();
    $(this).find('.glyphicon-triangle-right').toggle();
    $(this).find('.glyphicon-triangle-bottom').toggle();
});
$(".template_content").on('click','.ulShow li',function (e) {
    e.stopPropagation();
    $("span").removeClass("spanTy");
    $(this).children('span').addClass("spanTy");
    var customerName = $("#customerName").val();
    var outpatientName = $("#outpatientName").val();
    var address = $("#address").val();
    var phone = $("#phone").val();
    var time = $("#startTimeValue1").val();
    var doctor = $("#doctorValue1").val();
    var transportation = $("#transportationValue").val();
    $.ajax({
        url: Feng.ctxPath + "/msgSend/codeList",
        type: "POST",
        data:{
            context:$(this).text().trim(),
            customerName:customerName,
            outpatientName:outpatientName,
            address:address,
            phone:phone,
            transportation:transportation,
            doctor:doctor,
            time:time
        },
        success: function (data) {
            $("#message_content").val(data.context);
            $("#templateCodeValue").val(data.templateCode);
            $("#smsParameterId").val(data.smsParameterId);
        },
        error: function (data) {
            alert('没有权限，请联系系统管理员!');
            parent.layer.close(windowNameIndex)
        }
    })
})